{extend name="template/base" /}
{block name="content"}
{php}
use think\Db;
{/php}
<div class="page-container">
    {include file="send_form" /}
    <div class="cl pd-5 bg-1 bk-gray">
        <span class="l">
            {if empty($is_re)}
            <a class="btn btn-primary radius mr-5" id="sou" href="{:url('/admin/dispatch_traveler_group/export_to_excel/is_re/1',$searchCondition)}" >excel导出</a>
            {else}
            <a class="btn btn-primary radius mr-5" id="sou" href="{:url('/admin/dispatch_traveler_group/export_to_excel/is_re/2',$searchCondition)}" >excel导出</a>
            {/if}
        </span>
        <span class="r pt-5 pr-5">
            共有数据 ：<strong>{$count ?? '0'}</strong> 条
        </span>
    </div>
    <table class="table table-border table-bordered table-hover table-bg mt-20">
        <thead>
        <tr class="text-c">
            {include file="send_th" /}
        </tr>
        </thead>
        <tbody>
        {volist name="list" id="vo"}
        <tr class="text-c">
            {include file="send_td" /}
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="page-bootstrap">{$page ?? ''}</div>
</div>
{/block}

{block name="script"}
<script type="text/javascript" src="__LIB__/My97DatePicker/WdatePicker.js"></script>

<script>
    function accept(url) {
        $.ajax({
            type: 'POST',
            url: url,
            data: null,
            success: function (re){
                if(re.msg) {
                    layer.msg(re.msg, {
                        time: 2000, //2s后自动关闭
                    }, function () {
                        //关闭后刷新
                        location.reload();
                    });
                }else{
                    layer_open('司机接受','/admin/pub/role/id/1')
                }
            },
        });
    }
    function reset_group(url) {
        $.ajax({
            type: 'POST',
            url: url,
            data: null,
            success: function (re){
                layer.msg(re.msg, {
                    time: 2000, //2s后自动关闭
                },function () {
                    //关闭后刷新
                    location.reload();
                });
            },
        });
    }
    $(function () {
        $("[name='car_form']").find("[value='{$Request.param.car_form}']").attr("selected", true);
    })
</script>



<script>
    function driverInfo(id) {
        var url = '/admin/driver/details';
        if (!id){
            layer.msg('缺少必要的参数');
        }
        $.ajax({
            type: 'get',
            url: url,
            data:{ id: id },
            success: function (data) {
                if (data.code == 1){
                    layer.msg(data.msg)
                    return false
                }else{
                    layer_open('详细资料','/admin/driver/details/id/'+id,{w:'1300px',h:'750px'})
                }
            }
        })
    }
</script>
{/block}